﻿
using System.Xml.Serialization;
using rlTodayMakeSkin.Project.Attributes;
using rlTodayMakeSkin.Project.XmlElement;

namespace rlTodayMakeSkin.Project.XmlElement.XmlSubElements
{

    /// <summary>
    /// Abstract class that represents an element that can be
    /// contained in xml elements of skin
    /// </summary>
    abstract public class XmlSubElement
    {

        private rlTodayXmlElement parent;


        public XmlSubElement(rlTodayXmlElement p)
        {
            parent = p;
        }

        protected XmlSubElement() { }

        /// <summary>
        /// Return xml parent element that contains this element
        /// </summary>
        /// <returns></returns>
        public rlTodayXmlElement GetParent()
        {
            return parent;
        }

        /// <summary>
        /// Returns a value that indicats if this sub elements is empty and
        /// can be not serialized in the skin.xml file
        /// </summary>
        /// <returns>true if this sub element is empty.</returns>
        public abstract bool isEmpty();

    }
}
